import Layout from '../views/layout/index.vue';

/*
  页面路由配置规则：

  path：页面访问路径
  component：页面组件路径
  redirect：路由重定向（按需使用）
  hidden：是否不在菜单栏中显示 true：隐藏 false：显示   注意：默认不需配置此字段，只有需要隐藏时配置
  meta：附加信息
    title：菜单标题
    icon：菜单图标  注意：只有需要在菜单栏显示的菜单才需加此字段
    activeMenuTitle：进入子页面时左侧菜单栏中高亮的菜单名称（title值）注意：只有子页面才有此字段
    activeMenu：进入子页面时左侧菜单栏中高亮的菜单访问路径（path值）注意：只有子页面才有此字段

  一级页面path配置：/ + 路径  如：/userManage
  二级页面path配置：/ + 一级页面路径 + 子页面的路径   如：/userManage/userChild

  注意：路由的 path 和 name 值走小驼峰形式
*/

const dynamicRouters = [
  {
    path: '/',
    component: Layout,
    redirect: '/maintenanceCount',
    hidden: true,
    children: [
      {
        path: '/maintenanceCount',
        name: 'maintenanceCount',
        component: () =>
            import ('../views/maintenanceCount/index.vue'),
        meta: {
            title: '维保统计',
            icon: 'iconkucuntongji'
        }
     },
      {
        path: '/warningNotice',
        name: 'warningNotice',
        component: () =>
            import ('../views/warningNotice/index.vue'),
        meta: {
            title: '报警通知',
            icon: 'icongongchengshi'
        }
    },
    {
      path: '/warningRule',
      name: 'warningRule',
      component: () =>
          import ('../views/warningRule/index.vue'),
      meta: {
          title: '报警规则',
          icon: 'icongongchengshi'
      }
   },
   {
    path: '/addRule',
    name: 'addRule',
    component: () =>
        import ('../views/warningRule/util/addRule.vue'),
    meta: {
        title: '添加报警规则',
        icon: 'icongongchengshi'
    },
    hidden: true,
 },
 {
  path: '/addRule',
  name: 'addRule',
  component: () =>
      import ('../views/warningRule/util/addRule.vue'),
  meta: {
      title: '修改报警规则',
      icon: 'icongongchengshi'
  },
  hidden: true,
},
 {
  path: '/maintencePlan',
  name: 'maintencePlan',
  component: () =>
      import ('../views/maintenanceNotice/util/maintencePlan.vue'),
  meta: {
      title: '保养计划',
      icon: 'icongongchengshi'
  },
  hidden: true,
},
 {
  path: '/noticeSet',
  name: 'noticeSet',
  component: () =>
      import ('../views/warningRule/util/noticeSet.vue'),
  meta: {
      title: '报警通知设置',
      icon: 'icongongchengshi'
  },
  hidden: true
},
    {
      path: '/workOrderManage',
      name: 'workOrderManage',
      component: () =>
          import ('../views/workOrderManage/index.vue'),
      meta: {
          title: '工单管理',
          icon: 'iconweixiugongdan'
      }
    },{
            path: '/workOrderReceive',
            name: 'workOrderReceive',
            component: () =>
                import ('../views/workOrderReceive/index.vue'),
            meta: {
                title: '工单接收设置',
                icon: 'icongongdanjieshou'
            }
        },
        {
            path: '/workBench',
            name: 'workBench',
            component: () =>
                import ('../views/workBench/index.vue'),
            meta: {
                title: '工程师工作台',
                icon: 'icongongchengshi'
            }
        },
        {
          path: '/maintenanceNotice',
          name: 'maintenanceNotice',
          component: () =>
              import ('../views/maintenanceNotice/index.vue'),
          meta: {
              title: '保养通知',
              icon: 'icongongchengshi'
          }
      },
        {
            path: '/knowledgeBase',
            name: 'knowledgeBase',
            component: () =>
                import ( /* webpackChunkName: "knowledgeBase" */ '../views/knowledgeBase/index.vue'),
            meta: {
                title: '知识库',
                icon: 'iconzhishikuguanli'
            }
        }
    ]
}];

export default dynamicRouters;
